home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 1998 August / PC Plus SuperCD 50b Issue 142 (CD142b) (August 1998).iso / handson / VBwkshp / Form1.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1998-05-07  |  2.0 KB  |  69 lines

  1. VERSION 5.00
  2. Begin VB.Form Form1 
  3.    Caption         =   "Form2"
  4.    ClientHeight    =   3885
  5.    ClientLeft      =   3225
  6.    ClientTop       =   1470
  7.    ClientWidth     =   5775
  8.    LinkTopic       =   "Form2"
  9.    ScaleHeight     =   3885
  10.    ScaleWidth      =   5775
  11.    Begin VB.CommandButton Command4 
  12.       Caption         =   "Close"
  13.       Height          =   735
  14.       Left            =   3960
  15.       TabIndex        =   3
  16.       Top             =   2160
  17.       Width           =   1455
  18.    End
  19.    Begin VB.CommandButton Command3 
  20.       Caption         =   "Custom"
  21.       Height          =   735
  22.       Left            =   720
  23.       TabIndex        =   2
  24.       Top             =   2160
  25.       Width           =   1455
  26.    End
  27.    Begin VB.CommandButton Command2 
  28.       Caption         =   "Preview"
  29.       Height          =   735
  30.       Left            =   3960
  31.       TabIndex        =   1
  32.       Top             =   720
  33.       Width           =   1455
  34.    End
  35.    Begin VB.CommandButton Command1 
  36.       Caption         =   "Print"
  37.       Height          =   735
  38.       Left            =   720
  39.       TabIndex        =   0
  40.       Top             =   720
  41.       Width           =   1455
  42.    End
  43. Attribute VB_Name = "Form1"
  44. Attribute VB_GlobalNameSpace = False
  45. Attribute VB_Creatable = False
  46. Attribute VB_PredeclaredId = True
  47. Attribute VB_Exposed = False
  48. Const s = "c:\crw\Test1.rpt"
  49. Dim h, r As Integer
  50. Const xleft = 20, xtop = 10, xwidth = 700, xheight = 550
  51. Private Sub Command1_Click()
  52. r = PEPrintReport(s, 1, 0, "", 0, 0, 0, 0, 0, 0)
  53. End Sub
  54. Private Sub Command2_Click()
  55. r = PEPrintReport(s, 1, 1, "A Preview Window", _
  56.         xleft, xtop, xwidth, xheight, 0, 0)
  57. End Sub
  58. Private Sub Command3_Click()
  59. h = PEOpenPrintJob(s)
  60. r = PEOutputToPrinter(h, 1)
  61. r = PEOutputToWindow(h, "Custom Report", _
  62.         xleft, xtop, xwidth, xheight, 0, 0)
  63. r = PEStartPrintJob(h, 1)
  64. End Sub
  65. Private Sub Command4_Click()
  66. PECloseWindow (h)
  67. PEClosePrintJob (h)
  68. End Sub
  69.